﻿@using asMeishi.web.Models;
@model IEnumerable<asMeishi.web.Models.actions>
@{
    ViewBag.Title = "Index";
    var enumTitle = ViewBag.enumTitle as Dictionary<actionEnum, string>;
}
<h2>
    Index</h2>
<table>
    <tr>
        <th>
            动作名
        </th>
        <th>
            获得经验值
        </th>
        <th>
            需要hp
        </th>
        <th>
            增减hp
        </th>
        <th>
            花费mp
        </th>
        <th>
        </th>
    </tr>
    @foreach (var item in Model)
    {
        using (Html.BeginForm())
        {
        <tr>
            <td>
                @enumTitle[item.action]
                <input type="hidden" name="actionEnum" value="@((int)item.action)" />
                @*@Html.Hidden("actionEnum", (int)item.action)*@
            </td>
            <td>
                <input type="text" name="experience" value="@item.experience" />
                @*@Html.TextBox("experience", item.experience)*@
            </td>
            <td>
                <input type="text" name="demandForHp" value="@item.demandForHp" />
                @*@Html.TextBox("demandForHp", item.demandForHp)*@
            </td>
            <td>
                <input type="text" name="gainHp" value="@item.gainHp" />
                @*@Html.TextBox("gainHp", item.gainHp)*@
            </td>
            <td>
                <input type="text" name="decreaseMp" value="@item.decreaseMp" />
                @*@Html.TextBox("decreaseMp", item.decreaseMp)*@
            </td>
            <td>
                <input type="submit" value="保存" />
            </td>
        </tr>
        }
    }
</table>
